<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>ztree demo</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/ztree/zTreeStyle.css">
	<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="js/ztree/jquery.ztree.core-3.4.min.js"></script>
	<script type="text/javascript">
	var setting = {
		data: {
			simpleData: {
				enable: true
			}
		},
		view: {
			showLine:false,
			showIcon:true
		}
	};
	var zNodes =[
		{ id:1, pId:0, name:"展开、折叠 自定义图标不同", open:true, iconOpen:"css/ztree/img/diy/1_open.png", iconClose:"css/ztree/img/diy/1_close.png"},
		{ id:11, pId:1, name:"叶子节点1", icon:"css/ztree/img/diy/2.png"},
		{ id:12, pId:1, name:"叶子节点2", icon:"css/ztree/img/diy/3.png"},
		{ id:13, pId:1, name:"叶子节点3", icon:"css/ztree/img/diy/5.png"},
		{ id:2, pId:0, name:"展开、折叠 自定义图标相同", open:true, icon:"css/ztree/img/diy/4.png"},
		{ id:21, pId:2, name:"叶子节点1", icon:"css/ztree/img/diy/6.png"},
		{ id:22, pId:2, name:"叶子节点2", icon:"css/ztree/img/diy/7.png",url:"http://www.sina.com",target:"testIframe"},
		{ id:23, pId:2, name:"叶子节点3", icon:"css/ztree/img/diy/8.png",url:"http://www.sina.com",target:"_top"},
		{ id:3, pId:0, name:"不使用自定义图标", open:false},
		{ id:31, pId:3, name:"叶子节点1"},
		{ id:32, pId:3, name:"叶子节点2"},
		{ id:33, pId:3, name:"叶子节点3"}
	];
	$(document).ready(function(){
		$.fn.zTree.init($("#treeDemo"), setting, zNodes);
	}); 
	</script>
	<style type="text/css">
		

	</style>
  </head>
  
  <body>
    This is ztree demo page. <br>
    <div id="treeDemo" class="ztree"></div>
    
    <iframe src="" name="testIframe" width="400px" height="200px"></iframe>
  </body>
</html>
